#include<stdio.h>
#include<memory.h>
void test01()
{
 int arr1[10] = {1,2,3,4,5,6,7,8,9,10};
 int arr2[10]={0};

 memcpy(arr2,arr1,16);

 for(int i=0;i<4;i++)
 {

   printf("%d ",arr2[i]);
 }
   printf("\n");
}

void test02()
{
 int arr1[10] = {1,2,3,4,5,6,7,8,9,10};
 memmove(arr1,arr1+3,12);
 for(int i=0;i<10;i++)
 {
  printf("%d ",arr1[i]);
 }
 printf("\n");
}

void test03()
{
 char arr[] = "hello world";
 memset(arr,'*',6);//按照字节进行设置
 printf(arr);
 printf("\n");
 int i=1;
 memset(&i,1,4);
 printf("%d",i);
}

int main()
{

  test01();
  test02();
  test03();
  return 0;
}
